<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html>
  <head>
    <title>Witpn网-高品质交流: <?php $this->_block('title'); if(!empty($title)): echo $title; endif; $this->_endblock(); ?></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="证券交流 证券评论 股票评论 讨论  证券排行 股票排行 股票  证券 权证 看好 看跌 看涨">
	<meta http-equiv="description" content="高品质的交流，证券（股票，权证等）评论，根据用户的评论对证券打分、排名，找出最被看好的股票，权证">
	<link type="text/css" rel="stylesheet" href="<?php echo $_BASE_DIR; ?>css/style.css" />
	<?php if(isset($cssfiles) && is_array($cssfiles)): foreach($cssfiles as $cssfile):?>
   	<link rel="stylesheet" type="text/css" href="<?php echo $_BASE_DIR; ?>css/<?=$cssfile?>.css">
	<?php endforeach; endif;?>
  </head>
  
  <body>
    <div id = "container">
    	<?php 
    	$id = "";
    	if(in_array("member", Q::registry('app')->currentUserRoles())): $user = Q::registry("app")->currentUser();
    		$id = $user['id'];
    	endif;
    	?>
			<input type="hidden" id="userid" value="<?=$id ?>" />
	  	<div id="header" class="header">
        <div id = "navbar">
					<table style="width:100%;">
						<tr>
							<td style="width: 137px;"><a href="/sec"><img id="logo" style="float:left" src="/img/witpn.png" /></a></td>
							<td id="menu">
								<ul style="vertical-align: bottom;">
								<?php if (isset($location) && $location == 'sec'):?>
									<li><a href="/sec" class="current">首 页</a></li>
								<?php else: ?>
									<li><a href="/sec">首 页</a></li>
								<?php endif; ?>
								
								<?php if (isset($location) && $location == 'mine'): ?>
                                    <li><a href="/mine" class="current">个人页面</a></li>
                                <?php else:?>
                                    <li><a href="/mine">个人页面</a></li>
                                <?php endif;?>
                                
                                <?php if (isset($location) && $location == 'view'):?>
                                    <li><a href="/view" class="current">文章&评论</a></li>
                                <?php else: ?>
                                    <li><a href="/view">文章&评论</a></li>
                                <?php endif; ?> 
                                
								<?php if (isset($location) && $location == 'press'): ?>
									<li><a href="/press" class="current">新 闻</a></li>
								<?php else:?>
									<li><a href="/press">新 闻</a></li>
								<?php endif;?>
								
								
								</ul>
							</td>
							<td style="vertical-align: top; position: relative;">
								<div id="search" class="ui-corner-top">
									<form action="/search/sec" method="GET">
										<input class="textbox ui-corner-all" name="s" size="20" value="证券搜索" type="text">
										<input value="搜索" type="submit">
									</form>
								</div>
								<?php if(in_array("member", Q::registry('app')->currentUserRoles())): $user = Q::registry("app")->currentUser();?>
						        <div class="user">
						          <a href="/user/setting">个人信息</a> <a href="/user/logout">退出</a> 
						        </div>
							  	<?php else:?>
							  		<div class="user">
						          <a href="/user/login" style="font-size: 18px; padding: 5px; font-weight: bold; line-height: 1.5em;">登录</a> <a href="/user/register" style="font-size: 18px; padding: 5px; font-weight: bold; line-height: 1.5em;">注册</a> 
						        </div>
							  	<?php endif;?>
							</td>
						</tr>
					</table>
        	</div><!-- end of nav -->

      </div><!-- end of header -->
	<?php if(isset($haveHelper) && $haveHelper == true):?>	
      <div class="helper" id="helper">
      	<?php $this->_block("helper")?>
      	<?php $this->_endblock();?>
      <!-- helper end -->
      </div>
   <?php endif;?>
				
      <div id="content" <?php if(isset($haveHelper)): ?>class="have-helper"<?php endif;?>>
			<?php $this->_block('contents'); ?>
				<?php if (!empty($content)): echo $content; endif;?>
			<?php $this->_endblock(); ?>
      </div>
    		
      <div class="clear"></div>
		
      <div class="footer">
        <p style="padding: 5px 10px 2px 0px;">©witpn.com 2009  <a href="/about.html">关于WiTPn</a> <a href="/connect.html">联系我们</a></p> 
	  </div> <!-- end of the footer -->
	  	<script src="/js/jquery-1.3.2.js" type="text/javascript"></script>
	  	<script src="/js/jquery.form.js" type="text/javascript"></script>
		<script src="/js/all.js" type="text/javascript"></script>
	  	<?php if(isset($jsfiles) && is_array($jsfiles)): foreach($jsfiles as $jsfile):?>
	   	<script src="<?php echo $_BASE_DIR; ?>js/<?=$jsfile?>.js" type="text/javascript"></script>
	   	<?php endforeach; endif;?>
	   	<!-- ga -->
	   	<script type="text/javascript">
			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
			document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
		</script>
		<script type="text/javascript">
			try {
			var pageTracker = _gat._getTracker("UA-498196-7");
			pageTracker._trackPageview();
			} catch(err) {}
		</script>
	</div>
   </body>
</html>
